//
//  NSObject+YKSwizzle.h
//  YKKit
//
//  Created by 马洪伟 on 16/1/12.
//  Copyright © 2016年 悦康动力（北京）科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (YKSwizzle)

/**
 *  exchange {instance} method implementation with other instance method implementation
 *  @param originalMethodSEL original method SEL
 *  @param alternateMethodSEL alternate method SEL
 *  @param error point of the error
 *  @return whether exchange success
 */
+ (BOOL)yk_SwizzleMethod:(SEL)originalMethodSEL withMethod:(SEL)alternateMethodSEL error:(NSError *__autoreleasing *)error;

/**
 *  exchange {class} method implementation with other instance method implementation
 *  @param originalMethodSEL original method SEL
 *  @param alternateMethodSEL alternate method SEL
 *  @param error point of the error
 *  @return whether exchange success
 */
+ (BOOL)yk_SwizzleClassMethod:(SEL)originalMethodSEL withMethod:(SEL)alternateMethodSEL error:(NSError *__autoreleasing *)error;
@end
